<?php
/**
 * Created by PhpStorm.
 * User: cheng
 * Date: 2017/2/16
 * Time: 11:44
 */
 //http://localhost:90/voteProject/user_register.php?action=getUserInfo
 require_once('./fun_class/register_class.php');
 $GLOBALS['userInfo'] = new UserInfo();
 $method = isset($_GET["action"])?$_GET["action"]:null;
 if(empty($method) || is_null($method)){
     die("不能访问");
 }
 function UserInfo(){
     $GLOBALS['userInfo']->getUserInfo();
 }
 function ShopId() {
     $GLOBALS['userInfo']->getShopId();
 }
 function getAccess(){
     $GLOBALS['userInfo']->getAccessTicket();
 }
 function acceptAccess(){
     $GLOBALS['userInfo']->acceptTicket();
 }
 function getLocations(){
     $GLOBALS['userInfo']->getData();
 }
 if($method == "getUserInfo"){
     //获取提交表单的值
     UserInfo();
 }
 if($method == "getShop"){
     //获取公司的id
     ShopId();
 }
 if($method == "getAccess"){
     //获取accessToken
     getAccess();
 }
if($method == "acceptAccess"){
    //接收accessToken
    acceptAccess();
 }
 if($method == "getLocation"){
     getLocations();
 }
//http://ceshi.babypn.com/user_register.php?action=getAccess
//http://ceshi.babypn.com/user_register.php?action=getShop
//http://ceshi.babypn.com/user_register.php?action=getLocation
